package com.zrwl.poscloud.core.restapi.message;
import com.zrwl.poscloud.xo.service.WxService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wx")
@Slf4j
public class WxRestApi {
    @Autowired
    WxService wxService;

    @ApiOperation(value = "发送微信", notes = "发送微信", response = String.class)
    @RequestMapping("/sendWeChatMessage")
    public String sendWeChatMessage(@RequestParam("openId")String openId,@RequestParam("templateId")String templateId,@RequestParam("url")String url,@RequestParam("first")String first,@RequestParam("remark")String remark,@RequestParam("content")String content) throws Exception {
        return wxService.sendTemplateInfo(openId,templateId,url,first,remark,content);
    }
}
